import { i18n } from '@app-nextmesh/common/utils';
import { RJSFSchema } from '@rjsf/utils';
import { SelectedEntitiesSchema, SelectedEntitiesSchema2 } from '../jsonSchema';

const nameSchema: RJSFSchema = {
  Name: {
    type: 'string',
    title: i18n.t('name'),
    minLength: 1,
    maxLength: 100,
    pattern: '^[a-zA-Z][a-zA-Z0-9_]*$',
  },
};
export const schema: RJSFSchema = {
  type: 'object',
  required: ['Name', 'SelectedEntities'],
  properties: {
    ...nameSchema,
    ...SelectedEntitiesSchema,
  },
};

export const schema2: RJSFSchema = {
  type: 'object',
  required: ['Name', 'SelectedEntities'],
  properties: {
    ...nameSchema,
    ...SelectedEntitiesSchema2,
  },
};
